
/*  ************************************************************************  */
/*  File Name: Main_CODE.do                                                   */ 
/* 	Author:	Ray Ou-Yang	& Yingnan Joseph Zhou			                      */
/*  Last Update: March 10, 2026                                               */   			     
/*	Purpose: Replication code for "When the Miracle Ends: Chinese Political   */
/*           Support in a Time of Economic Slowdowns"                         */
/*	************************************************************************  */


*************************************************************************************
* Table 2: Instrumental Variable Models for Cross-Time Analysis (Second Stage Only) *

/* Model 1 */

mi estimate, post cmdok esampvaryok: ivtobit lo_support (evaluation = de_first) yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave) ll(1) ul(4) 

mi test yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married evaluation

/* Model 2 */

mi estimate, post cmdok esampvaryok: ivtobit cen_support (evaluation = de_first) yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave) ll(1) ul(4) 

mi test yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married evaluation

/* Model 3 */

mi estimate, post cmdok esampvaryok: ivtobit support_narrow (evaluation = de_first) yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave) ll(1) ul(10) 

mi test yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married evaluation 

/* Model 4 */

mi estimate, post cmdok esampvaryok: ivtobit support_broad (evaluation = de_first) yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave) ll(1) ul(25) 

mi test yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married evaluation


****************************************************
* Table 3: Mediation Tests for Cross-Time Analysis *

/* Test for Model 1 */

mi estimate, post esampvaryok: regress evaluation yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave)

matrix A = e(b)
scalar a = A[1, "yearly_growth_change"]

mi estimate, post cmdok esampvaryok: ivtobit lo_support (evaluation = de_first) yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave) ll(1) ul(4) 

nlcom (indirect: _b[evaluation] * a)

/* Test for Model 2 */

mi estimate, post esampvaryok: regress evaluation yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave)

matrix A = e(b)
scalar a = A[1, "yearly_growth_change"]

mi estimate, post cmdok esampvaryok: ivtobit cen_support (evaluation = de_first) yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave) ll(1) ul(4) 

nlcom (indirect: _b[evaluation] * a)

/* Test for Model 3 */

mi estimate, post esampvaryok: regress evaluation yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave)

matrix A = e(b)
scalar a = A[1, "yearly_growth_change"]

mi estimate, post cmdok esampvaryok: ivtobit support_narrow (evaluation = de_first) yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave) ll(1) ul(10) 

nlcom (indirect: _b[evaluation] * a)

/* Test for Model 4 */

mi estimate, post esampvaryok: regress evaluation yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave)

matrix A = e(b)
scalar a = A[1, "yearly_growth_change"]

mi estimate, post cmdok esampvaryok: ivtobit support_broad (evaluation = de_first) yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn], vce(cluster wave) ll(1) ul(25) 

nlcom (indirect: _b[evaluation] * a)


*************************************************************************************************************
* Table 4: Instrumental Variable Models for Cross-Provincial Analysis (Second Stage Only - 2008 ABS Wave 2) *

/* Model 5 */

mi estimate, post cmdok esampvaryok: tobit lo_support evaluation_2008 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province) ll(1) ul(4) 

/* Model 6 */

mi estimate, post cmdok esampvaryok: tobit cen_support evaluation_2008 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province) ll(1) ul(4) 

/* Model 7 */

mi estimate, post cmdok esampvaryok: tobit support_narrow evaluation_2008 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province) ll(1) ul(10) 

/* Model 8 */

mi estimate, post cmdok esampvaryok: tobit support_broad evaluation_2008 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province) ll(1) ul(25) 


****************************************************************************
* Table 5: Mediation Tests for Cross-Provincial Analysis (2008 ABS Wave 2) *

/* Test for Model 5 */

mi estimate, post esampvaryok: regress evaluation pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province)

matrix A = e(b)
scalar a = A[1, "pro_yearly_growth_change"]

mi estimate, post cmdok esampvaryok: tobit lo_support evaluation_2008 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province) ll(1) ul(4) 

nlcom (indirect: _b[evaluation_2008] * a)

/* Test for Model 6 */

mi estimate, post esampvaryok: regress evaluation pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province)

matrix A = e(b)
scalar a = A[1, "pro_yearly_growth_change"]

mi estimate, post cmdok esampvaryok: tobit cen_support evaluation_2008 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province) ll(1) ul(4) 

nlcom (indirect: _b[evaluation_2008] * a)

/* Test for Model 7 */

mi estimate, post esampvaryok: regress evaluation pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province)

matrix A = e(b)
scalar a = A[1, "pro_yearly_growth_change"]

mi estimate, post cmdok esampvaryok: tobit support_narrow evaluation_2008 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province) ll(1) ul(10) 

nlcom (indirect: _b[evaluation_2008] * a)

/* Test for Model 8 */

mi estimate, post esampvaryok: regress evaluation pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province)

matrix A = e(b)
scalar a = A[1, "pro_yearly_growth_change"]

mi estimate, post cmdok esampvaryok: tobit support_broad evaluation_2008 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if year == 2008, vce(cluster province) ll(1) ul(25) 

nlcom (indirect: _b[evaluation_2008] * a)


********************************************************************************************************
* Table 6: Instrumental Variable Models for Cross-Provincial Analysis (Second Stage Only - ABS Wave 5) *

/* Model 9 */

mi estimate, post cmdok esampvaryok: tobit lo_support evaluation_wave5 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province) ll(1) ul(4) 

/* Model 10 */

mi estimate, post cmdok esampvaryok: tobit cen_support evaluation_wave5 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province) ll(1) ul(4) 

/* Model 11 */

mi estimate, post cmdok esampvaryok: tobit support_narrow evaluation_wave5 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province) ll(1) ul(10) 

/* Model 12 */

mi estimate, post cmdok esampvaryok: tobit support_broad evaluation_wave5 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province) ll(1) ul(25) 


***********************************************************************
* Table 7: Mediation Tests for Cross-Provincial Analysis (ABS Wave 5) *

/* Test for Model 9 */

mi estimate, post esampvaryok: regress evaluation pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province)

matrix A = e(b)
scalar a = A[1, "pro_yearly_growth_change"]

mi estimate, post cmdok esampvaryok: tobit lo_support evaluation_wave5 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province) ll(1) ul(4) 

nlcom (indirect: _b[evaluation_wave5] * a)

/* Test for Model 10 */

mi estimate, post esampvaryok: regress evaluation pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province)

matrix A = e(b)
scalar a = A[1, "pro_yearly_growth_change"]

mi estimate, post cmdok esampvaryok: tobit cen_support evaluation_wave5 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province) ll(1) ul(4) 

nlcom (indirect: _b[evaluation_wave5] * a)

/* Test for Model 11 */

mi estimate, post esampvaryok: regress evaluation pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province)

matrix A = e(b)
scalar a = A[1, "pro_yearly_growth_change"]

mi estimate, post cmdok esampvaryok: tobit support_narrow evaluation_wave5 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province) ll(1) ul(10) 

nlcom (indirect: _b[evaluation_wave5] * a)

/* Test for Model 12 */

mi estimate, post esampvaryok: regress evaluation pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province)

matrix A = e(b)
scalar a = A[1, "pro_yearly_growth_change"]

mi estimate, post cmdok esampvaryok: tobit support_broad evaluation_wave5 pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married [pw = w_cn] if wave == 5, vce(cluster province) ll(1) ul(25) 

nlcom (indirect: _b[evaluation_wave5] * a)


***************************************************************************************
* Table 8: Matched-Sample Tests of Perceived Economic Slowdowns and Political Support *

/* Sub-Sample Matching (provinces of residence controlled) */

clear all

use "Main_DATA.dta"

mi xeq: psmatch2 slowdown_wave2 income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married evaluation de_first if com_season == 1 & com_province == 1, neighbor(1) common

mi xeq: generate byte matched = (_treated == 1 | _weight > 0 & _weight != .) & _support == 1
generate long pair = cond(_treated==1, _id, _n1)
mi xeq: keep if matched

/* Model 13 */

mi estimate, post cmdok esampvaryok: tobit lo_support slowdown_wave2 [pw = w_cn], ll(1) ul(4) vce(cluster pair)

/* Model 14 */

mi estimate, post cmdok esampvaryok: tobit cen_support slowdown_wave2 [pw = w_cn], ll(1) ul(4) vce(cluster pair)

/* Model 15 */

mi estimate, post cmdok esampvaryok: tobit support_narrow slowdown_wave2 [pw = w_cn], ll(1) ul(10) vce(cluster pair)

/* Model 16 */

mi estimate, post cmdok esampvaryok: tobit support_broad slowdown_wave2 [pw = w_cn], ll(1) ul(25) vce(cluster pair)

/* Sub-Sample Matching (provinces of residence not controlled) */

clear all

use "Main_DATA.dta"

mi xeq: psmatch2 slowdown_wave2 income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married evaluation de_first if com_season == 1, neighbor(1) common 

mi xeq: generate byte matched = (_treated == 1 | _weight > 0 & _weight != .) & _support == 1
generate long pair = cond(_treated==1, _id, _n1)
mi xeq: keep if matched

/* Model 17 */

mi estimate, post cmdok esampvaryok: tobit lo_support slowdown_wave2 [pw = w_cn], ll(1) ul(4) vce(cluster pair)

/* Model 18 */

mi estimate, post cmdok esampvaryok: tobit cen_support slowdown_wave2 [pw = w_cn], ll(1) ul(4) vce(cluster pair)

/* Model 19 */

mi estimate, post cmdok esampvaryok: tobit support_narrow slowdown_wave2 [pw = w_cn], ll(1) ul(10) vce(cluster pair)

/* Model 20 */

mi estimate, post cmdok esampvaryok: tobit support_broad slowdown_wave2 [pw = w_cn], ll(1) ul(25) vce(cluster pair)


*********************************************************************************
/* Appendix 1: Descriptive Statistics for Individual-Level Variables (Imputed) */

clear all

use "Main_DATA.dta"

/* ABS Waves 1, 3, 4, and 5 */

foreach n of numlist 1 3 4 5 {

misum lo_support cen_support support_narrow support_broad income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married evaluation de_first if wave == `n', format(%9.2f)

}

/* ABS Wave 2 */

foreach y of numlist 2007 2008 {

misum lo_support cen_support support_narrow support_broad income internal_efficacy conventional autho bi_inpertrust interest corruption male age educ married evaluation de_first if year == `y', format(%9.2f)

}


*********************************************************************
/* Appendix 2: Descriptive Statistics for National-Level Variables */

clear all

use "Main_DATA.dta"

misum yearly_growth_change yearly_growth thousand_yearly_capita gov_quality yearly_aggressiveness


***********************************************************************
/* Appendix 3: Descriptive Statistics for Provincial-Level Variables */

clear all

use "Main_DATA.dta"

/* ABS Wave 2 (2008 Only) */

misum pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita if year == 2008

/* ABS Wave 5 */

misum pro_yearly_growth_change pro_yearly_growth thousand_pro_yearly_capita if wave == 5








